<!DOCTYPE html>
<html>
<head>
  <title>Typewriter Effect Demo</title>
  <script src="./typewriterEffect.js"></script>
</head>
<body>
  <h1 id="typewriter"></h1>

  <script>
    const typewriter = new Typewriter('#typewriter', {
      delay: 75, // 打字延迟：75ms
    });

    typewriter
      .typeString('Hello, World!')
      .pauseFor(1000)
      .deleteAll()
      .typeString('This is a typewriter effect demo.')
      .pauseFor(1000)
      .deleteChars(5)
      .typeString('awesome!')
      .start();
  </script>
</body>
</html>